﻿<ribbon:RibbonWindow x:Class="LoghogInterface.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:tk="http://schemas.microsoft.com/wpf/2008/toolkit" 
        xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        xmlns:res="clr-namespace:LoghogInterface.Properties"
        xmlns:my="clr-namespace:LoghogInterface"
        xmlns:view="clr-namespace:LoghogInterface.Views"
        Title="{x:Static res:Resources.Loghog}"
		x:Name="RibbonWindow"
		Width="640" Height="480" MinWidth="500" MinHeight="250">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="137"/>
            <RowDefinition Height="304*"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>
        <Grid.Resources>
            <my:BoolToVisibilityConverter x:Key="BoolToVisConverter" />
            <my:ViewModel x:Key="VMResource" />
        </Grid.Resources>

        <DataGrid Grid.Row="1" 
                  ItemsSource="{Binding GridData}" 
                  AutoGenerateColumns="True"
                  IsReadOnly="True" 
                  Name="JournalDG"
                  HorizontalScrollBarVisibility="Auto"
                  VerticalScrollBarVisibility="Auto"/>

        <ribbon:Ribbon x:Name="Ribbon">
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu SmallImageSource="Images\SmallIcon.png">
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.SetEdit}"
                                                      ImageSource="Images\LargeIcon.png"
                                                      Command="{Binding ShowSettings}"/>
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.ImportXml}"
                                                      ImageSource="Images\LargeIcon.png"/>
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.ExportXml}"
                                                      ImageSource="Images\LargeIcon.png"/>
                    <ribbon:RibbonApplicationMenuItem Header="{x:Static res:Resources.Exit}"
                                                      ImageSource="Images\LargeIcon.png"
                                                      Click="CloseWindow"/>
                    
                </ribbon:RibbonApplicationMenu>
            </ribbon:Ribbon.ApplicationMenu>
            
            <ribbon:RibbonTab Header="{x:Static res:Resources.Main}">
                <ribbon:RibbonGroup Header="{x:Static res:Resources.Events}">
                    <ribbon:RibbonButton LargeImageSource="Images\LargeIcon.png"
                                         Label="{x:Static res:Resources.Refresh}" Command="{Binding UpdateJournal}" />
                    <ribbon:RibbonButton SmallImageSource="Images\SmallIcon.png"
                                         Label="{x:Static res:Resources.AddEvent}" Command="{Binding AddEvent}" />
                </ribbon:RibbonGroup>
                
            </ribbon:RibbonTab>
            
            <!-- Вкладка "Вид" -->
            <ribbon:RibbonTab Header="{x:Static res:Resources.View}">
                <ribbon:RibbonGroup Header="{x:Static res:Resources.Collums}">
                    <ribbon:RibbonButton LargeImageSource="Images\LargeIcon.png"
                                         Label="{x:Static res:Resources.OrderCollums}"
                                         Click="RibbonButton_Click"/>
                </ribbon:RibbonGroup>
                
                <ribbon:RibbonGroup Header="{x:Static res:Resources.WriteCollums}">
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.ID}" IsChecked="{Binding ShowID}" >
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.Division}" IsChecked="{Binding ShowDivision}">
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.TextEvent}" IsChecked="{Binding ShowTextEvent}">
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.Date}" IsChecked="{Binding ShowDate}">
                    </ribbon:RibbonCheckBox>
                    <ribbon:RibbonCheckBox Label="{x:Static res:Resources.Tags}" IsChecked="{Binding ShowTags}">
                    </ribbon:RibbonCheckBox>
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
        </ribbon:Ribbon>
    </Grid>
</ribbon:RibbonWindow>
